package com.fram.common.enums;

/**
 * @作者： 陳曉鬆 @时间： 2018年12月29日 - 下午2:04:45 @description：->
 */
public enum PayCodeEnum {

	ALIPAY(1, "支付宝"),
	WECHAT(2, "微信"),
	BALANCE(3, "余额支付"),

	SOURCE_1(1, "小程序"),
	SOURCE_2(2, "H5"),
	SOURCE_3(3, "公众号"),
	SOURCE_4(4, "苹果"),
	SOURCE_5(5, "安卓");

	private Integer type;

	private String payName;

	private PayCodeEnum(Integer type, String payName) {
		this.type = type;
		this.payName = payName;
	}

	public static String payTypeCode(Integer payType) {
		String code = null;
		if (ALIPAY.getType().equals(payType)) {
			code = ALIPAY.getPayName();
		} else if (WECHAT.getType().equals(payType)) {
			code = WECHAT.getPayName();
		} else if (BALANCE.getType().equals(payType)) {
			code = BALANCE.getPayName();
		}
		return code;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public String getPayName() {
		return payName;
	}

	public void setPayName(String payName) {
		this.payName = payName;
	}
}
